<script src="app/controllers/sitemaps/AddSitemapController.js"></script>

<div class="hfr-loading" ng-class="{true:'hfr-showContent', false:''}[showViewContent]" ng-controller="AddSitemapController">
	<div class="hfr-contentLoadingBar">
		<div id="dot1" class="loader-dot"></div>
		<div id="dot2" class="loader-dot"></div>
		<div id="dot3" class="loader-dot"></div>
	</div>
	<div class="hfr-loadingStatus">
		
		<!-- VIEW Add Sitemap
    	================================================== -->
		<div id="hfr-addSitemap" class="container hfr-margin-auto">
			<div class="hfr-interactive">
				Interactive blog : <a href>{{blogId}}</a>
			</div>
			<div class="row row-eq-height">
				<div class="col-md-7">
					<h2 class="hfr-heading">{{pageTitle}}</h2>
					<form class="hfr-formAddSitemap" name="smForm">
						<div class="form-group">
							<label>{{'static.addSitemap.labelSitemap' | translate}}</label>
							<span class="label label-danger" ng-show="submitted && smForm.sitemap.$error.required">{{'message.error.required' | translate}}</span>
							<span class="label label-danger" ng-show="submitted && smForm.$error.url">{{'message.error.url' | translate}}</span>
							<div class="input-group">
								<input type="url" placeholder="{{'static.addSitemap.placeholderSitemap' | translate}}" class="form-control" ng-model="slf.sitemap" ng-init="slf.sitemap=init.sitemap" name="sitemap" required>
								<span class="input-group-addon ti-world"></span>
							</div>
						</div>
						<br />
						<div class="form-group">
							<label>{{'static.addSitemap.labelCustom' | translate}}</label>
							<span class="label label-danger" ng-show="submitted && smForm.customSelector.$error.required">{{'message.error.required' | translate}}</span>
							<textarea class="form-control" ng-model="slf.customSelector" ng-init="slf.customSelector=init.customSelector" name="customSelector" id="selector-id" ui-codemirror="{ onLoad : codemirrorLoaded }" ui-codemirror-opts="editorOptions">{{init.customSelector}}</textarea>
						</div>
						<div class="form-group">
							<div class="row">
								<div class="col-md-4">
									<a href class="hfr-button-link" back-button>
										<span class="ti-angle-left"></span> {{'static.layout.back' | translate}}
									</a>
								</div>
								<div class="col-md-8 content-right">
									<button type="button" class="hfr-button-cyan hfr-solid" data-toggle="modal" data-target=".hfr-postPreviewModal" ng-hide="success" ng-click="preview(smForm)"
										ng-class="{'hfr-loading': processing == true}" ng-disabled="processing" >
										<span class="hfr-spin ti-reload"></span>{{'static.addSitemap.labelPreview' | translate}}
									</button>
								</div>
							</div>
						</div>
					</form>
				</div>
				<div class="col-md-5">
					<div id="hfr-postOptions">
						<accordion>
							<accordion-group>
								<accordion-heading>
									<span class="hfr-icon ti-settings"></span> Options
								</accordion-heading>
								<div class="hfr-otherOptions">
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionGetAllLinkTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-getAllLinkYes" ng-model="otf.getAll" value="{{'static.layout.yes' | translate}}">
														<label for="hfr-getAllLinkYes">{{'static.layout.yes' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-getAllLinkNo"  ng-model="otf.getAll" value="{{'static.layout.no' | translate}}">
														<label for="hfr-getAllLinkNo">{{'static.layout.no' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionRemoveTagTitle' | translate}} &lt;a&gt;</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-removeTagYes" ng-model="otf.removeTagA" value="{{'static.layout.yes' | translate}}">
														<label for="hfr-removeTagYes">{{'static.layout.yes' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-removeTagNo" ng-model="otf.removeTagA" value="{{'static.layout.no' | translate}}">
														<label for="hfr-removeTagNo">{{'static.layout.no' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionShareTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-shareYes" ng-model="otf.share" value="{{'static.layout.yes' | translate}}">
														<label for="hfr-shareYes">{{'static.layout.yes' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-shareNo" ng-model="otf.share" value="{{'static.layout.no' | translate}}">
														<label for="hfr-shareNo">{{'static.layout.no' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionSourceTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-sourceYes" ng-model="otf.source" value="{{'static.layout.yes' | translate}}">
														<label for="hfr-sourceYes">{{'static.layout.yes' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-sourceNo" ng-model="otf.source" value="{{'static.layout.no' | translate}}">
														<label for="hfr-sourceNo">{{'static.layout.no' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionLinkTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-linkNofollow" ng-model="otf.typelink" value="nofollow">
														<label for="hfr-linkNofollow">{{'static.addSitemap.optionLinkNofollow' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-linkFollow" ng-model="otf.typelink" value="follow">
														<label for="hfr-linkFollow">{{'static.addSitemap.optionLinkFollow' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionSourceTypeTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-sourceTypeText" ng-model="otf.sourceType" value="{{'static.addSitemap.optionSourceTypeText' | translate | lowercase}}">
														<label for="hfr-sourceTypeText">{{'static.addSitemap.optionSourceTypeText' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-sourceTypeLink" ng-model="otf.sourceType" value="{{'static.addSitemap.optionSourceTypeLink' | translate | lowercase}}">
														<label for="hfr-sourceTypeLink">{{'static.addSitemap.optionSourceTypeLink' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">{{'static.addSitemap.optionSourceImageTitle' | translate}}</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-sourceImageOriginal" ng-model="otf.sourceImage" value="original">
														<label for="hfr-sourceImageOriginal">{{'static.addSitemap.optionSourceImageOriginal' | translate}}</label>
													</li>
													<li>
														<input type="radio" id="hfr-sourceImageCdn" ng-model="otf.sourceImage" value="cdn">
														<label for="hfr-sourceImageCdn">{{'static.addSitemap.optionSourceImageCDN' | translate}}</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="row">
											<div class="col-md-5">Remove inline style image</div>
											<div class="col-md-7">
												<ul class="hfr-inputStyle list-2-cols">
													<li>
														<input type="radio" id="hfr-removeInlineImageYes" name="removeInlineImage">
														<label for="hfr-removeInlineImageYes">Yes</label>
													</li>
													<li>
														<input type="radio" id="hfr-removeInlineImageNo" name="removeInlineImage">
														<label for="hfr-removeInlineImageNo">No</label>
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div class="form-group">
										Option for custom style
									</div>
								</div>
							</accordion-group>
							<accordion-group is-open="status.isFirstOpen">
								<accordion-heading>
									<span class="hfr-icon ti-folder"></span> Topics
								</accordion-heading>
								<div class="form-group hfr-topics">
									<p><strong>{{'static.addSitemap.optionTopicTitle' | translate}}</strong></p>
									<div class="input-group">
										<input type="text" class="form-control" placeholder="Ex : topic-1, topic-2" id="hfr-inputCategory" ng-model="otf.category" ng-init="otf.category=''">
										<span class="input-group-addon ti-folder"></span>
									</div>
									<ul class="hfr-inputStyle list-2-cols">
                              			<li>
                              				<input type="checkbox" id="hfr-category-blogs">
											<label for="hfr-category-blogs">Blogs</label>
                                            <span title="remove" class="ti-close remove-category"></span>
                                         </li>
                                     </ul>
								</div>
							</accordion-group>
						</accordion>
					</div>
				</div>
			</div>
			
			<!-- Post preview modal -->
			<script type="text/ng-template" id="postPreview.html">
				<div class="hfr-loading" ng-class="{true:'hfr-showContent', false:''}[showContentPreview]">
					<div class="hfr-contentLoadingBar">
						<div id="dot1" class="loader-dot"></div>
						<div id="dot2" class="loader-dot"></div>
						<div id="dot3" class="loader-dot"></div>
					</div>
					<div class="hfr-loadingStatus">
					<!-- PREVIEW Add Sitemap
    				================================================== -->
    				<form class="hfr-formAddSitemap hfr-postPreviewModal" name="otForm">
						<div class="modal-body">
							<span class="ti-close" data-dismiss="modal" title="close" ng-click="close()"></span>
							<div class="row">
								<div class="col-md-12">
									<tabset>
										<!-- TAB PREVIEW -->
										<tab active="tab.active">
											<tab-heading><span class="ti-desktop"></span>{{'static.addSitemap.titleTabPreview' | translate}}</tab-heading>
											<div id="hfr-postPreview">
												<div>
													<span class="ti-link"></span> 
													<a href target="_blank">
														{{link}}
													</a>
												</div>
												<div><span class="ti-pencil"></span> {{title}}</div>
												<div>
													<span class="ti-align-left"></span>
													<div ng-bind-html="content"></div>
												</div>
											</div>
										</tab>
										<!-- TAB PREVIEW END -->
									</tabset>
								</div>
							</div>
						</div>
						<div class="modal-footer" ng-show="addSitemap">
							<div class="row">
								<div class="col-md-3 col-md-offset-9">
									<button type="submit" class="hfr-button-blue hfr-solid" ng-click="submit(otForm)"
										ng-class="{'hfr-loading': submitting == true}" ng-disabled="submitting">
										<span class="hfr-spin ti-reload"></span>{{btnSubmitSitemap}}
									</button>
								</div>
							</div>
						</div>
					</form>
    				<!-- =============== End preview =============== -->
					</div>
				</div>
					
			</script>
		</div>
    	<!-- =============== End view =============== -->
	</div>
</div>
